<?php
class ResourceLink extends Resource
{
	private $URL;

	public function __construct($database, $resourceID)
	{
		$this->database = $database;
		parent::__construct($database, $resourceID);
		
		if ($resourceID != 0)
		{
			$sql = "SELECT * from Links WHERE ResourceIDP=".$this->resourceID;
//			echo $sql;
			$this->database->ExecuteSQL($sql);
			$row = $this->database->getRow();
			
			$this->URL = $row['URL'];
		}
	}
	
	
	public function getDataHTML()
	{
		$html = "<p>URL = ".$this->URL."</p>\n";
		
		return $html;
	}
	
}

?>